package com.fqgj.xjd.user.client.enums;

/**
 * kyc状态
 * @author zsp
 */
public enum UserKycStatusEnum {
    /**/
    INIT(0, "init"),
    /**/
    CHECK_SUCCESS(1, "bind success"),
    CHECK_FAIL(2, "bind fail"),
    RE_UPLOAD(3, "re-upload");

    int status;
    String desc;

    UserKycStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public UserKycStatusEnum setStatus(int status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public UserKycStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static UserKycStatusEnum getEnumByStatus(Integer status) {
        UserKycStatusEnum aadhaarStatusEnum = null;
        for (UserKycStatusEnum enumObj : UserKycStatusEnum.values()) {
            if (enumObj.getStatus() == status) {
                aadhaarStatusEnum = enumObj;
                break;
            }
        }
        return aadhaarStatusEnum;
    }
}
